package com.shirotest.utility;

import org.apache.commons.codec.binary.Base64;

public class Base64Utility {
	public static String encode(byte[] source){
		try{
			return Base64.encodeBase64String(source);
		}catch(Exception e){
			throw new RuntimeException(e);
		}
	}
	
	public static byte[] decode(String source){
		try{
			return Base64.decodeBase64(source);
		}catch(Exception e){
			throw new RuntimeException(e);
		}
	}
}
